package com.rightsidetech.activity.mapper;

import com.rightsidetech.activity.dto.request.ActEntityCouponReq;
import com.rightsidetech.activity.dto.request.ActUserCouponReq;
import com.rightsidetech.activity.dto.response.ActEntityCouponResp;
import com.rightsidetech.activity.dto.response.ActUserCouponResp;
import com.rightsidetech.activity.entity.ActCouponActivityCode;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ActCouponActivityCodeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ActCouponActivityCode record);

    int insertSelective(ActCouponActivityCode record);

    ActCouponActivityCode selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ActCouponActivityCode record);

    int updateByPrimaryKey(ActCouponActivityCode record);

    List<ActUserCouponResp> userCoupon(@Param("req") ActUserCouponReq req);

    int selectCountCodeByCode(@Param("code") String code);

    Long selectByCouponActivityIdAndStatus(@Param("activityId")Long activityId, @Param("status") Byte status);

    ActCouponActivityCode selectCodeByCode(@Param("code") String code);

    List<ActCouponActivityCode> selectByActivityIdAndStatus(@Param("activityId") Long activityId,@Param("status") Byte status);

    int updateStatusByCode(@Param("code") String code, @Param("status") Byte status);

    List<ActEntityCouponResp> selectEntityCoupon(ActEntityCouponReq req);

}